Rails.application.config.active_record.belongs_to_required_by_default = false if Rails::VERSION::MAJOR == 5